package com.xindacloud.sms.portal.controller;


import com.xindacloud.sms.portal.service.ISmsProjectService;
import com.xindacloud.sms.portal.vo.ProjectsResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;


@SuppressWarnings("ALL")
@Api(tags = {"Project接口"})
@RestController
@RequestMapping(value = "/api/v1/portal/project")
@Deprecated
public class ProjectController {

    @Autowired
    ISmsProjectService projectService;

    @ApiOperation(value = "查询项目列表", response = ProjectsResultVO.class)
    @GetMapping(value = "/users/{userId}", produces = MediaType.APPLICATION_JSON_VALUE)
    public Object queryProjectList(@ApiParam(name = "userId", value = "用户Id", required = true)
                                   @PathVariable String userId,
                                   HttpServletRequest request) {
        return projectService.queryProjectListById(Integer.parseInt(userId));
    }


}
